<template>
  <baidu-map :center="{lng: 113.663221, lat: 34.7568711}" :zoom="11">
    <bm-view class="map"></bm-view>
    <bm-control :offset="{width: '10px', height: '10px'}">
      <bm-auto-complete v-model="sstart" :sugStyle="{zIndex: 1}">
        <input placeholder="请输入地名关键字"></input> <!-- 这里指代一个自定义搜索框组件 -->
      </bm-auto-complete>
      <bm-auto-complete v-model="eend" :sugStyle="{zIndex: 1}">
        <input placeholder="请输入地名关键字"></input> <!-- 这里指代一个自定义搜索框组件 -->
      </bm-auto-complete>
    </bm-control>
    <bm-driving
      :start="sstart"
      :end="eend"
      :auto-viewport="true"
      policy="BMAP_DRIVING_POLICY_LEAST_DISTANCE"
      :panel="false"
      location="郑州"
      :waypoints="['垃圾综合处理厂']">
    </bm-driving>
  </baidu-map>
</template>
<script>
export default {
  data () {
    return {
      sstart: '',
      eend: ''
    }
  }
}
</script>
<style>
.map {
  width: 100%;
  height: 700px;
}
</style>
